<%@ page import="org.wlw.service.UserManager" %>
<%@ page import="java.util.List" %>
<%@ page import="org.wlw.models.User" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>显示用户信息</title>
    <script src="bootstrap-3.4.1-dist/js/jquery-3.6.0.min.js"></script>
    <script src="bootstrap-3.4.1-dist/js/bootstrap.min.js"></script>
    <link href="bootstrap-3.4.1-dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div class="container">
        <table class="table table-hover table-striped table-bordered">
            <thead>
                <tr class="warning">
                    <td>用户id</td>
                    <td>用户名</td>
                    <td>用户昵称</td>
                    <td>年龄</td>
                </tr>
            </thead>
            <tbody>

            <%
                UserManager um = new UserManager();
                List<User> users = um.createUsers();
                for(User u:users) {

            %>
            <tr>
                <td><%=u.getId()%></td>
                <td><%=u.getUsername()%></td>
                <td><%=u.getNickname()%></td>
                <td><%=u.getAge()%></td>
            </tr>
            <%
                }
            %>

            </tbody>
        </table>
    </div>
</body>
</html>
